]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
iconGrid: Don't recreate StIcons on icon theme changes
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 23 Jan 2024 22:40:04 +0000 (23:40 +0100)
committerMarge Bot <marge-bot@gnome.org>
Fri, 26 Jan 2024 23:36:25 +0000 (23:36 +0000)
Now that StIcon updates its texture automatically on icon theme
changes, we only have to recreate icon actors that aren't StIcons.

(This probably only applies to the folder icon in the app grid
where the sub-icons do use St.Icon, but making that assumption
feels dodgy with an API as generic as `createIcon()`)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3141>

js/ui/iconGrid.js

index d55f30d135ee823b5c1078367ed782e12da244d7..75cc6f7b050dfb85e632e22c0338eac4400142ed 100644 (file)
@@ -156,7 +156,9 @@ class BaseIcon extends Shell.SquareBin {
     }
 
     _onIconThemeChanged() {
-        this._createIconTexture(this.iconSize);
+        // St.Icon updates automatically
+        if (!(this.icon instanceof St.Icon))
+            this._createIconTexture(this.iconSize);
     }
 
     animateZoomOut() {